package app.dev.ems.web.wicket.panel.menu.horizontal.user;

import java.io.Serializable;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.link.Link;

import app.dev.ems.web.element.NavigationStatus;
import app.dev.ems.web.wicket.factory.MenuContainerFactory;
import app.dev.ems.web.wicket.factory.NavigationLinkFactory;
import app.dev.ems.web.wicket.panel.menu.horizontal.BaseHorizontalMenuPanel;

public class UserHorizontalMenuPanel extends BaseHorizontalMenuPanel {

	private static final long serialVersionUID = 1939937602485134968L;

	public UserHorizontalMenuPanel(String id) {
		super(id);

		WebMarkupContainer homeContainer = MenuContainerFactory.INSTANCE.getHomeContainer();
		Link<Serializable> home = NavigationLinkFactory.INSTANCE.getUserHomeLink();
		add(homeContainer.add(home));
		getMenuMap().put(NavigationStatus.HOME, new Component[] { homeContainer, home });

		WebMarkupContainer profileContainer = MenuContainerFactory.INSTANCE.getProfileContainer();
		Link<Serializable> profile = NavigationLinkFactory.INSTANCE.getProfileLink();
		add(profileContainer.add(profile));
		getMenuMap().put(NavigationStatus.PROFILE, new Component[] { profileContainer, profile });

		setSelectedLink();
	}
}
